
import request from "../../utils/request";
import axios from "axios";


export function deleteGoodsSubmit(el) {
    this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
        center: true
    }).then(() => {
        axios({
            methods: 'delete',
            url: 'http://localhost:8090/RealGoods/DelGoods',
            params: {
                id: e1
            }
        }).then((res) => {
            console.log(res.data);
            if (res.data.msg == null) {
                this.a()
                this.$message({
                    type: 'success',
                    message: '删除成功!'
                });
                // this.x.$emit('12345', 'dasd')
            } else {
                this.$message({
                    type: 'error',
                    message: res.data.msg
                });
            }
        })

    }).catch(() => {
        this.$message({
            type: 'info',
            message: '已取消删除'
        });
    });
}

